# -*- coding: utf-8 -*-
# TencentBlueKing is pleased to support the open source community by making
# 蓝鲸智云 - PaaS 平台 (BlueKing - PaaS System) available.
# Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
# Licensed under the MIT License (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
#     http://opensource.org/licenses/MIT
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific language governing permissions and
# limitations under the License.
#
# We undertake not to change the open source license (MIT license) applicable
# to the current version of the project delivered to anyone in the future.

# Generated by Django 3.2.12 on 2023-08-21 10:02

from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('applications', '0009_application_is_scene_app'),
    ]

    operations = [
        migrations.CreateModel(
            name='BKMonitorSpace',
            fields=[
                ('uuid', models.UUIDField(auto_created=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True, verbose_name='UUID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('id', models.IntegerField(verbose_name='蓝鲸监控空间 id')),
                ('space_type_id', models.CharField(max_length=48, verbose_name='空间类型id')),
                ('space_id', models.CharField(help_text='同一空间类型下唯一', max_length=48, verbose_name='空间id')),
                ('space_name', models.CharField(max_length=64, verbose_name='空间名称')),
                ('space_uid', models.CharField(help_text='{space_type_id}__{space_id}', max_length=48, verbose_name='蓝鲸监控空间 uid')),
                ('extra_info', models.JSONField(help_text='蓝鲸监控API-metadata_get_space_detail 的原始返回值')),
                ('application', models.OneToOneField(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='bk_monitor_space', to='applications.application')),
            ],
            options={
                'unique_together': {('space_type_id', 'space_id')},
            },
        ),
    ]
